********************************************************************************
***** 	Ellenbroek Meijers Krouwel 										  
*****	Stata Dofile: Populist but Pluralist? Populist Attitudes and Preferences for Political Pluralism in Parliament and Government			  
*****	Kieskompas Election Study 2017								     			 	  
********************************************************************************

clear

use "replication file", replace


/// Table 1: factor analysis
factor pop1 pop2 pop3 pop4 pop5 pop6 plu1 plu2, pf 
estat kmo
rotate, blanks(0.3)
alpha pop1-pop6


/// Table 2: Model 1 (and 1a, 1b, 1c)

global xlist  popatt5 plu1 plu2 lr_sp lr_sp2 cp_sp cp_sp2 distecon distcult i.gender age i.edu 

// model 1
nbreg 	nparties  			$xlist , rob 

// model 1a
nbreg 	npartiesgov 		$xlist , rob

// model 1b
nbreg 	npartiesins_nogov 	$xlist , rob

// model 1c
nbreg 	npartiesoutside 	$xlist , rob
	

/// Models 2 (and 2a, 2b)
nbreg 	coalparties 		$xlist , rob

nbreg 	coalpartiesgov 		$xlist , rob

nbreg 	coalpartiesnogov 	$xlist , rob

